
var initRoleActionsInfoBean;
var getRoleActionsInfoBeanFromOpenPage = function(){
	var roleactionsinfoBean = {};
	
	roleactionsinfoBean.id = jQuery('#idEditor').val();
	
	roleactionsinfoBean.actionId = jQuery('#actionIdEditor').val();
	if(!roleactionsinfoBean.actionId){
		$.ligerDialog.error("请输入功能编号!");
		return null;
	}
	
	roleactionsinfoBean.roleId = jQuery('#roleIdEditor').val();
	if(!roleactionsinfoBean.roleId){
		$.ligerDialog.error("请输入角色编号!");
		return null;
	}
	
	return roleactionsinfoBean;
};

var initRoleActionsInfoPage = function(){
	
	
	
};

var bindRoleActionsInfoUpdateButtom = function(){
	jQuery('#updateEdit').unbind('click').click(function(){
		var roleactionsinfoBean = getRoleActionsInfoBeanFromOpenPage();
		if(null != roleactionsinfoBean){
			doSaveRoleActionsInfos([roleactionsinfoBean]);
		}
	});
};
var bindRoleActionsInfoResetButtom = function(){
	jQuery('#resetEdit').unbind('click').click(function(){
		if(!initRoleActionsInfoBean){
			jQuery("#actionIdEditor").val('');
			jQuery("#roleIdEditor").val('');
		}else{
			if(!initRoleActionsInfoBean.actionId){
				jQuery("#actionIdEditor").val('');
			}else{
				jQuery("#actionIdEditor").val(initRoleActionsInfoBean.actionId);
			}
			if(!initRoleActionsInfoBean.roleId){
				jQuery("#roleIdEditor").val('');
			}else{
				jQuery("#roleIdEditor").val(initRoleActionsInfoBean.roleId);
			}
		}
	});
};



jQuery(function(){
	initRoleActionsInfoPage();
	bindRoleActionsInfoUpdateButtom();
	bindRoleActionsInfoResetButtom();
});